KindEditor.ready(function(K) {
    var editor = K.create('#content', {
        allowFileManager : true,
        width: '99%',
        height: 600,
        afterCreate : function() {
            this.sync();
        },
        afterBlur:function(){
            this.sync();
        }
    });
});

$(document).ready(function () {

    //监听表单提交
    layui.form.on('submit(submitBtn)', function(data){
        $.post('/ref/duties/edit', $("#dataForm").serialize(), function(result) {
            if (200 == result.code) {
                layer.alert("保存成功");
            } else {
                layer.alert("保存失败");
            }
        });
        return false;
    });
});